<?php

if (!defined('BASEPATH')) exit('No direct script access allowed');

class Home extends MY_Controller {
    
    public function __construct()
    {
        parent::__construct();
        
        //Check login
        if(!$this->auth->is_logged_in()){
            redirect('/index');
        }
    }

    /**
     * Index Page for this controller.
     */
    public function index() {
        //Get user info
        $userInfo = $this->auth->get_user();
        
        //Parse to view
        $this->assign('userInfo', $userInfo);
    }

}